<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:84:"D:\php\www\12.74.103.73\gh_pcyy_cn\public/../application/index\view\Set\adduser.html";i:1650697838;s:74:"D:\php\www\12.74.103.73\gh_pcyy_cn\application\index\view\Common\head.html";i:1653381376;s:74:"D:\php\www\12.74.103.73\gh_pcyy_cn\application\index\view\Common\menu.html";i:1653377790;s:76:"D:\php\www\12.74.103.73\gh_pcyy_cn\application\index\view\Common\footer.html";i:1648437088;}*/ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="/favicon.ico" >
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src='/index/lib/html5.js'></script>
    <script type="text/javascript" src="/index/lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/index/static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="/index/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="/index/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="/index/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="/index/static/h-ui.admin/css/style.css" />
    <link rel="stylesheet" type="text/css" href="/index/media.css" />
    <link rel="stylesheet" type="text/css" href="/index/yy/style.css" />
    <script type="text/javascript" src="/index/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="/index/lib/datatables/1.10.0/jquery.tablesorter.min.js"></script>
    <script type="text/javascript" src="/layer/layer.js"></script>

	<title>深圳鹏程</title>
    <!--[if IE 6]>
    <script type="text/javascript" src="/index/static/h-ui.admin/js/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <!--/meta 作为公共模版分离出去-->

    <style type="text/css">
        .menu>li>a{color:#000000;}
        #hello{

        }
        #hell-icon{
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background-color: red;
            float: right;
            margin-top: -35px;
            margin-right: -25px;
            position: relative;
            line-height: 18px;
            text-align: center;
            display: none;
        }
        #hell-icon-xs{
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background-color: red;
            float: left;
            position: absolute;
            right: 65px;
            top: 12px;
            line-height: 18px;
            text-align: center;
            display: none !important;

        }
    </style>

    <!--_header 作为公共模版分离出去-->
    <header class="navbar-wrapper">
        <div class="navbar navbar-fixed-top">
            <div class="container-fluid cl"> <a class="logo navbar-logo f-l mr-10 hidden-xs" href="/index/Index/listdata">深圳鹏程医院</a> <a class="logo navbar-logo-m f-l mr-10 visible-xs" href="/index/Index/listdata">深圳鹏程医院</a>
                <span class="logo navbar-slogan f-l mr-10 hidden-xs">v2.0</span>

                <a href="/index/Index/DeleteData" id="hell-icon-xs" class="navbar-logo-m visible-xs">0</a>
                <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:;">&#xe667;</a>

                <nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
                    <ul class="cl">


            <li class="dropDown dropDown_hover" ><div id="hello"></div>
                <a href="/index/Index/DeleteData"><div id="hell-icon">2</div></a>
            </li>

            <li class="dropDown dropDown_hover"> <a href="#" class="dropDown_A">退出 <i class="Hui-iconfont">&#xe6d5;</i></a>

                            <ul class="dropDown-menu menu radius box-shadow">
                                <li><a href="/index/Login/logout">切换账户</a></li>
                                <li><a href="/index/Set/updatepass">修改密码</a></li>
                                <li><a href="/index/Login/logout">退出</a></li>
                            </ul>
                        </li>

                        <li id="Hui-skin" class="dropDown right dropDown_hover"> <a href="javascript:;" class="dropDown_A" title="换肤"><i class="Hui-iconfont" style="font-size:18px">&#xe62a;</i></a>
                            <ul class="dropDown-menu menu radius box-shadow">
                                <li><a href="javascript:;" data-val="default" title="默认（黑色）">默认（黑色）</a></li>
                                <li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
                                <li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
                                <li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
                                <li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
                                <li><a href="javascript:;" data-val="orange" title="橙色">橙色</a></li>
                            </ul>
                        </li>
                    </ul>
                </nav>
            </div>
        </div>
    </header>
    <script type="text/javascript">
        $(function(){
            //console.log(getCookie("auth"));
            //显示当前用户用户名
            $("#hello").html(getCookie("auth").split("-")[0]);

            function getCookie(name) {
                var cookies = document.cookie;
                var list = cookies.split("; ");          // 解析出名/值对列表
                    for(var i = 0; i < list.length; i++) {
                    var arr = list[i].split("=");          // 解析出名和值

                         if(arr[0] == name)
                             return decodeURIComponent(arr[1]);   // 对cookie值解码
                         } 
                return "";
            }

        });

        $.post("/index/Index/selectDeleteData",{"ids":0},function (e) {


            if(e>0){
                $("#hell-icon").show()
                $("#hell-icon").html(e)
                var w=$(window).width();
                if(w>800){

                }else{
                    $("#hell-icon-xs").css('cssText','display: block !important;')
                    $("#hell-icon-xs").html(e)
                }

            }
        })


    </script>
    <!--/_header 作为公共模版分离出去-->

<style type="text/css">

</style>

<!--_menu 作为公共模版分离出去-->
<aside class="Hui-aside">

    <div class="menu_dropdown bk_2">
        <ul>
            <?php if(is_array($qx) || $qx instanceof \think\Collection || $qx instanceof \think\Paginator): $i = 0; $__LIST__ = $qx;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;                if($vo['p_content']){
                ?>
<li><a href="<?php echo $vo['p_action']; ?>" title="<?php echo $vo['p_content']; ?>"><?php echo $vo['p_content']; ?></a></li>
            <?php
                }
            endforeach; endif; else: echo "" ;endif; 				if(isMobile()){
            ?>
            <li><a href="/index/Set/updatepass">修改密码</a></li>
            <li><a href="/index/Login/logout">退出</a></li>
            <?php
                }
			?>
        </ul>
    </div>
</aside>

<script type="text/javascript">
    function showtc(){
        layer.open({
            title:"添加",
            type: 2,
            area: ['900px', '600px'],
            fixed: false, //不固定
            maxmin: true,
            content: '/index/Index/tcadd'
        });
    }

    $(function(){
        //设置弹窗按钮的链接
        //$("ul li").getAttribute("title");
        $(".bk_2 ul li a").each(function(i){
            //不可更改，屏幕太小，不显示分析按钮
           if(this.title=="添加"&&document.body.clientWidth>760){
               this.href="javascript:showtc()";
           }

            if(this.title=="统计"&&document.body.clientWidth<760){
                console.log($(this).css("display","none"));
            }

            if(this.title=="项目统计"&&document.body.clientWidth<760){
                console.log($(this).css("display","none"));
            }
		


        });
    });


</script>

<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>
<!--/_menu 作为公共模版分离出去-->


<link href="/index/yy/index.css" rel="stylesheet">
<link href="/index/yy/laydate.css" rel="stylesheet">
<script src="/index/yy/laydate.js"></script>
<script type="text/javascript" src="/index/laydate/laydate.js"></script>

<style type="text/css">
*{font-size: 15px!important;}

    .layui-input{
        width: 100px;
    }
</style>

<section class="Hui-article-box">

    <form class="appointment">
        <ul>


            <li>
                <h2>账号：</h2>
                <input type="text" autocomplete="off" name="user" class="layui-input user"  placeholder="输入账号">
            </li>
            <li>
                <h2>密码：</h2>
                <input type="text" autocomplete="off" name="password" class="layui-input password"  placeholder="输入密码">
            </li>

            <li></li>
        </ul>

    </form>
    <div><input class="btn btn-success radius submit" type="button" value="添加" style="margin-left: 40px;"></div>

    <br/>
    <br/>

    <div id="my_table">
        <table class="table table-border table-bordered table-striped table-hover table-bg tablesorter" id="mytable">
            <thead>
            <tr class="text-c">
                <th>账号</th>
                <th>操作</th>

            </tr>
            </thead>
            <tbody class="tbody">


            <?php if(is_array($data) || $data instanceof \think\Collection || $data instanceof \think\Paginator): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>

            <tr>
                <td><?php echo $vo['uname']; ?></td>
                <td>

                    <input class="btn radius btn-warning" ids="<?php echo $vo['id']; ?>" uname="<?php echo $vo['uname']; ?>" type="button" value="修改">
                    <input class="btn btn-danger radius delete" ids="<?php echo $vo['id']; ?>" type="button" value="删除">
                </td>
            </tr>
            <?php endforeach; endif; else: echo "" ;endif; ?>

            </tbody>
        </table>
    </div>
</section>
<script>
    //修改
    $(".btn-warning").on("click",function(){
        id = $(this).attr("ids");
        uname=$(this).attr("uname");
        location.href="/index/Set/updatepass?id="+id+"&uname="+uname;

    })
    //删除
    $(".delete").on("click",function(){
        id = $(this).attr("ids");
        var postdata = {"id":id};

        $.post("/index/Set/deleteuser",postdata,function(e){
            if(e==1){
                Huimodalalert('删除成功',2000)
            }else{

            }
        });
    })

    $(".submit").on("click",function(){
        user     = $(".user").val();        //账号
        password     = $(".password").val();        //密码

        if(user==''||password==''){
            alert("账号和密码不能为空");
            return false;
        }

        var postdata = {
            "user":user,
            "password":password
        };
        //console.log(postdata);


        $.post("/index/Set/adduser",postdata,function(e){
            console.log(e);
            if(e==1){
                $.Huimodalalert('添加成功',2000);
                window.close();
                setInterval(function(){
                    location.reload();
                },2000)
            }else{

            }
        });
    })

    function Huimodalalert(text,second){
        $.Huimodalalert(text,second);
        window.close();
        setInterval(function(){
            location.reload();
        },second)
    }
</script>
<!--_footer 作为公共模版分离出去-->

<script type="text/javascript" src="/index/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/index/static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="/index/static/h-ui.admin/js/H-ui.admin.page.js"></script>
<script type="text/javascript" src="/index/js/hd.js"></script>

<!--/_footer /作为公共模版分离出去-->
